package com.itheima.edu.info.manager.homeworkday03.homework03;

public class Test {
    public static void main(String[] args) {
function(new Cat());
    }
    public static void function(Animal animal){
        animal.eat();
        if(animal instanceof Cat){
            Cat cat=(Cat)animal;
            cat.catchMouse();
        }
    }
}
